package com.yun.zf.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yun.zf.common.admin.domain.SysUserOrder;
import com.yun.zf.common.app.dto.center.OrderListDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户订单合同关系表 Mapper 接口
 * </p>
 *
 * @author cj
 * @since 2021-08-18
 */
@Mapper
public interface SysUserOrderMapper extends BaseMapper<SysUserOrder> {


    @Select("<script>" +
            "SELECT so.id,so.province_code,so.city_code, o.address ,o.house_id ,so.money_explain,so.order_status from zf_sub_order so  LEFT JOIN zf_order o on so.order_id= o.id \n" +
            "WHERE so.id=#{subId} AND so.city_code=#{cityCode} and so.province_code=#{provCode}  " +
            "</script>")
    public OrderListDto getOrderList(Long provCode, Long cityCode,Long subId);
}
